﻿@model IEnumerable<GSLMS.Entity.TB_LOAN_CONTRACTTMP>
@{
    Layout = null;
    ViewBag.ViewTitle = "合同模板查询";
    int i = 1;
    var SearchParma = ViewData["SearchParma"] as GSLMS.Entity.TB_LOAN_CONTRACTTMP ?? new GSLMS.Entity.TB_LOAN_CONTRACTTMP();
    var tmpFlagList = ViewData["tmpFlagList"] as SelectList;
    var systemIDList = ViewData["systemIDList"] as SelectList;
    var statusList = ViewData["statusList"] as SelectList;
    var tmpTypeList = ViewData["tmpTypeList"] as SelectList;
}
<form id="pagerForm" method="get" action="Contract/ConTmp/index?action=page&OpID=@ViewData["OperateID"]">
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="@ViewData["pageSize"]" />
<input type="hidden" name="RowCount" value="@ViewData["RowCount"]" />
<input type="hidden" name="TMPNAME" value="@SearchParma.TMPNAME" />
<input type="hidden" name="STATUS" value="@SearchParma.STATUS" />
<input type="hidden" name="SYSTEMID" value="@SearchParma.SYSTEMID" />
<input type="hidden" name="TMPTYPE" value="@SearchParma.TMPTYPE" />
<input type="hidden" name="TMPFLAG" value="@SearchParma.TMPFLAG" />
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this)" id="Form_@ViewData["CurrentController"]" action="Contract/ConTmp/index?action=search&OpID=@ViewData["OperateID"]"
    method="post">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    名称：
                </td>
                <td>
                    @Html.TextBox("TMPNAME", SearchParma.TMPNAME, new { @style = "width:100px;" })
                </td>
                <td>
                    状态:
                </td>
                <td>
                    @Html.DropDownList("STATUS", statusList, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new { @class = "", @style = "width:80px;" })
                </td>
                <td>
                    对应子系统:
                </td>
                <td>
                    @Html.DropDownList("SYSTEMID", systemIDList, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new { @class = "", @style = "width:80px;" })
                </td>
                <td>
                    模板类别:
                </td>
                <td>
                    @Html.DropDownList("TMPTYPE", tmpTypeList, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new { @class = "", @style = "width:80px;" })
                </td>
                <td>
                    合同类别:
                </td>
                <td>
                    @Html.DropDownList("TMPFLAG", tmpFlagList, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new { @class = "", @style = "width:80px;" })
                </td>
                <td align="right">
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <button type="submit" name="submit">
                                            检索</button></div>
                                </div>
                            </li>
                            <li>
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <button type="reset" name="reset">
                                            重置</button></div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</div>
<div class="pageContent">
    @Html.Partial("Buttons")
    <table class="list" layouth="95" id="tableContractTmpList">
        <thead>
            <tr class="header">
                <th style="width:155px;">
                    模板名称
                </th>
                <th style="width:120px;">
                    模板类别
                </th>
                <th style="width:80px;">
                    状态
                </th>
                <th style="width:120px;">
                    合同类别
                </th>
                <th style="width:100px;">
                    对应子系统
                </th>
                <th style="width:80px;">
                    创建人
                </th>
                <th style="width:120px;">
                    创建时间
                </th>
            </tr>
        </thead>
        @foreach (var item in Model)
        {            
            <tr target="ContractTmpList_id" rel="@item.ID">
                <td>
                    @item.TMPNAME
                </td>
                <td>
                    @((GSLMS.Entity.Enum.ContractEnum.ContractTmpType)item.TMPTYPE)
                </td>
                <td style="text-align:center;">
                    @((GSLMS.Entity.Enum.ContractEnum.IsEffective)item.STATUS)
                </td>
                <td style="text-align:center;">
                    @((GSLMS.Entity.Enum.ContractEnum.ContractTmpFlag)item.TMPFLAG)
                </td>
                <td style="text-align:center;">
                   @((GSLMS.Entity.Enum.ApplyEnum.RegSystemID)item.SYSTEMID)
                </td>
                <td style="text-align:center;">
                  @item.CREATEBY
                </td>
                <td style="text-align:center;">
                    @(item.CREATEDATE == null ? "" : item.CREATEDATE.Value.ToString("yyyy-MM-dd HH:mm:ss"))
                </td>
                
            </tr>
            i += 1;
        }
    </table>
</div>
@Html.Partial("PageBar")
<script type="text/javascript">

    function gotoFile(obj) {
        window.open("/Areas/Contract/Views/ConTmp/ModifyDoc.aspx");
    }



    function pdialogOpen($this, url, title) {
        //var title = $this.attr("title") || $this.text();
        var rel = $this.attr("rel") || "_blank";
        var options = {};
        var w = $this.attr("width");
        var h = $this.attr("height");
        if (w) options.width = w;
        if (h) options.height = h;
        options.max = eval($this.attr("max") || "false");
        options.mask = eval($this.attr("mask") || "false");
        options.maxable = eval($this.attr("maxable") || "true");
        options.minable = eval($this.attr("minable") || "true");
        options.fresh = eval($this.attr("fresh") || "true");
        options.resizable = eval($this.attr("resizable") || "true");
        options.drawable = eval($this.attr("drawable") || "true");
        options.close = eval($this.attr("close") || "");
        options.param = $this.attr("param") || "";
        //var url = unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first"));
        DWZ.debug(url);
        if (!url.isFinishedTm()) {
            alertMsg.error($this.attr("warn") || DWZ.msg("alertSelectMsg"));
            return false;
        }
        $.pdialog.open(url, rel, title, options);
    }
</script>
